package com.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class ShopExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    private Integer limit;

    private Integer offset;

    public ShopExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public Integer getOffset() {
        return offset;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        public Criteria andShidIsNull() {
            addCriterion("shid is null");
            return (Criteria) this;
        }

        public Criteria andShidIsNotNull() {
            addCriterion("shid is not null");
            return (Criteria) this;
        }

        public Criteria andShidEqualTo(String value) {
            addCriterion("shid =", value, "shid");
            return (Criteria) this;
        }

        public Criteria andShidNotEqualTo(String value) {
            addCriterion("shid <>", value, "shid");
            return (Criteria) this;
        }

        public Criteria andShidGreaterThan(String value) {
            addCriterion("shid >", value, "shid");
            return (Criteria) this;
        }

        public Criteria andShidGreaterThanOrEqualTo(String value) {
            addCriterion("shid >=", value, "shid");
            return (Criteria) this;
        }

        public Criteria andShidLessThan(String value) {
            addCriterion("shid <", value, "shid");
            return (Criteria) this;
        }

        public Criteria andShidLessThanOrEqualTo(String value) {
            addCriterion("shid <=", value, "shid");
            return (Criteria) this;
        }

        public Criteria andShidLike(String value) {
            addCriterion("shid like", value, "shid");
            return (Criteria) this;
        }

        public Criteria andShidNotLike(String value) {
            addCriterion("shid not like", value, "shid");
            return (Criteria) this;
        }

        public Criteria andShidIn(List<String> values) {
            addCriterion("shid in", values, "shid");
            return (Criteria) this;
        }

        public Criteria andShidNotIn(List<String> values) {
            addCriterion("shid not in", values, "shid");
            return (Criteria) this;
        }

        public Criteria andShidBetween(String value1, String value2) {
            addCriterion("shid between", value1, value2, "shid");
            return (Criteria) this;
        }

        public Criteria andShidNotBetween(String value1, String value2) {
            addCriterion("shid not between", value1, value2, "shid");
            return (Criteria) this;
        }

        public Criteria andShnameIsNull() {
            addCriterion("shname is null");
            return (Criteria) this;
        }

        public Criteria andShnameIsNotNull() {
            addCriterion("shname is not null");
            return (Criteria) this;
        }

        public Criteria andShnameEqualTo(String value) {
            addCriterion("shname =", value, "shname");
            return (Criteria) this;
        }

        public Criteria andShnameNotEqualTo(String value) {
            addCriterion("shname <>", value, "shname");
            return (Criteria) this;
        }

        public Criteria andShnameGreaterThan(String value) {
            addCriterion("shname >", value, "shname");
            return (Criteria) this;
        }

        public Criteria andShnameGreaterThanOrEqualTo(String value) {
            addCriterion("shname >=", value, "shname");
            return (Criteria) this;
        }

        public Criteria andShnameLessThan(String value) {
            addCriterion("shname <", value, "shname");
            return (Criteria) this;
        }

        public Criteria andShnameLessThanOrEqualTo(String value) {
            addCriterion("shname <=", value, "shname");
            return (Criteria) this;
        }

        public Criteria andShnameLike(String value) {
            addCriterion("shname like", value, "shname");
            return (Criteria) this;
        }

        public Criteria andShnameNotLike(String value) {
            addCriterion("shname not like", value, "shname");
            return (Criteria) this;
        }

        public Criteria andShnameIn(List<String> values) {
            addCriterion("shname in", values, "shname");
            return (Criteria) this;
        }

        public Criteria andShnameNotIn(List<String> values) {
            addCriterion("shname not in", values, "shname");
            return (Criteria) this;
        }

        public Criteria andShnameBetween(String value1, String value2) {
            addCriterion("shname between", value1, value2, "shname");
            return (Criteria) this;
        }

        public Criteria andShnameNotBetween(String value1, String value2) {
            addCriterion("shname not between", value1, value2, "shname");
            return (Criteria) this;
        }

        public Criteria andShaddressIsNull() {
            addCriterion("shaddress is null");
            return (Criteria) this;
        }

        public Criteria andShaddressIsNotNull() {
            addCriterion("shaddress is not null");
            return (Criteria) this;
        }

        public Criteria andShaddressEqualTo(String value) {
            addCriterion("shaddress =", value, "shaddress");
            return (Criteria) this;
        }

        public Criteria andShaddressNotEqualTo(String value) {
            addCriterion("shaddress <>", value, "shaddress");
            return (Criteria) this;
        }

        public Criteria andShaddressGreaterThan(String value) {
            addCriterion("shaddress >", value, "shaddress");
            return (Criteria) this;
        }

        public Criteria andShaddressGreaterThanOrEqualTo(String value) {
            addCriterion("shaddress >=", value, "shaddress");
            return (Criteria) this;
        }

        public Criteria andShaddressLessThan(String value) {
            addCriterion("shaddress <", value, "shaddress");
            return (Criteria) this;
        }

        public Criteria andShaddressLessThanOrEqualTo(String value) {
            addCriterion("shaddress <=", value, "shaddress");
            return (Criteria) this;
        }

        public Criteria andShaddressLike(String value) {
            addCriterion("shaddress like", value, "shaddress");
            return (Criteria) this;
        }

        public Criteria andShaddressNotLike(String value) {
            addCriterion("shaddress not like", value, "shaddress");
            return (Criteria) this;
        }

        public Criteria andShaddressIn(List<String> values) {
            addCriterion("shaddress in", values, "shaddress");
            return (Criteria) this;
        }

        public Criteria andShaddressNotIn(List<String> values) {
            addCriterion("shaddress not in", values, "shaddress");
            return (Criteria) this;
        }

        public Criteria andShaddressBetween(String value1, String value2) {
            addCriterion("shaddress between", value1, value2, "shaddress");
            return (Criteria) this;
        }

        public Criteria andShaddressNotBetween(String value1, String value2) {
            addCriterion("shaddress not between", value1, value2, "shaddress");
            return (Criteria) this;
        }

        public Criteria andSejointimeIsNull() {
            addCriterion("sejointime is null");
            return (Criteria) this;
        }

        public Criteria andSejointimeIsNotNull() {
            addCriterion("sejointime is not null");
            return (Criteria) this;
        }

        public Criteria andSejointimeEqualTo(Date value) {
            addCriterionForJDBCDate("sejointime =", value, "sejointime");
            return (Criteria) this;
        }

        public Criteria andSejointimeNotEqualTo(Date value) {
            addCriterionForJDBCDate("sejointime <>", value, "sejointime");
            return (Criteria) this;
        }

        public Criteria andSejointimeGreaterThan(Date value) {
            addCriterionForJDBCDate("sejointime >", value, "sejointime");
            return (Criteria) this;
        }

        public Criteria andSejointimeGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("sejointime >=", value, "sejointime");
            return (Criteria) this;
        }

        public Criteria andSejointimeLessThan(Date value) {
            addCriterionForJDBCDate("sejointime <", value, "sejointime");
            return (Criteria) this;
        }

        public Criteria andSejointimeLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("sejointime <=", value, "sejointime");
            return (Criteria) this;
        }

        public Criteria andSejointimeIn(List<Date> values) {
            addCriterionForJDBCDate("sejointime in", values, "sejointime");
            return (Criteria) this;
        }

        public Criteria andSejointimeNotIn(List<Date> values) {
            addCriterionForJDBCDate("sejointime not in", values, "sejointime");
            return (Criteria) this;
        }

        public Criteria andSejointimeBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("sejointime between", value1, value2, "sejointime");
            return (Criteria) this;
        }

        public Criteria andSejointimeNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("sejointime not between", value1, value2, "sejointime");
            return (Criteria) this;
        }

        public Criteria andSepwdIsNull() {
            addCriterion("sepwd is null");
            return (Criteria) this;
        }

        public Criteria andSepwdIsNotNull() {
            addCriterion("sepwd is not null");
            return (Criteria) this;
        }

        public Criteria andSepwdEqualTo(String value) {
            addCriterion("sepwd =", value, "sepwd");
            return (Criteria) this;
        }

        public Criteria andSepwdNotEqualTo(String value) {
            addCriterion("sepwd <>", value, "sepwd");
            return (Criteria) this;
        }

        public Criteria andSepwdGreaterThan(String value) {
            addCriterion("sepwd >", value, "sepwd");
            return (Criteria) this;
        }

        public Criteria andSepwdGreaterThanOrEqualTo(String value) {
            addCriterion("sepwd >=", value, "sepwd");
            return (Criteria) this;
        }

        public Criteria andSepwdLessThan(String value) {
            addCriterion("sepwd <", value, "sepwd");
            return (Criteria) this;
        }

        public Criteria andSepwdLessThanOrEqualTo(String value) {
            addCriterion("sepwd <=", value, "sepwd");
            return (Criteria) this;
        }

        public Criteria andSepwdLike(String value) {
            addCriterion("sepwd like", value, "sepwd");
            return (Criteria) this;
        }

        public Criteria andSepwdNotLike(String value) {
            addCriterion("sepwd not like", value, "sepwd");
            return (Criteria) this;
        }

        public Criteria andSepwdIn(List<String> values) {
            addCriterion("sepwd in", values, "sepwd");
            return (Criteria) this;
        }

        public Criteria andSepwdNotIn(List<String> values) {
            addCriterion("sepwd not in", values, "sepwd");
            return (Criteria) this;
        }

        public Criteria andSepwdBetween(String value1, String value2) {
            addCriterion("sepwd between", value1, value2, "sepwd");
            return (Criteria) this;
        }

        public Criteria andSepwdNotBetween(String value1, String value2) {
            addCriterion("sepwd not between", value1, value2, "sepwd");
            return (Criteria) this;
        }

        public Criteria andSesaltIsNull() {
            addCriterion("sesalt is null");
            return (Criteria) this;
        }

        public Criteria andSesaltIsNotNull() {
            addCriterion("sesalt is not null");
            return (Criteria) this;
        }

        public Criteria andSesaltEqualTo(String value) {
            addCriterion("sesalt =", value, "sesalt");
            return (Criteria) this;
        }

        public Criteria andSesaltNotEqualTo(String value) {
            addCriterion("sesalt <>", value, "sesalt");
            return (Criteria) this;
        }

        public Criteria andSesaltGreaterThan(String value) {
            addCriterion("sesalt >", value, "sesalt");
            return (Criteria) this;
        }

        public Criteria andSesaltGreaterThanOrEqualTo(String value) {
            addCriterion("sesalt >=", value, "sesalt");
            return (Criteria) this;
        }

        public Criteria andSesaltLessThan(String value) {
            addCriterion("sesalt <", value, "sesalt");
            return (Criteria) this;
        }

        public Criteria andSesaltLessThanOrEqualTo(String value) {
            addCriterion("sesalt <=", value, "sesalt");
            return (Criteria) this;
        }

        public Criteria andSesaltLike(String value) {
            addCriterion("sesalt like", value, "sesalt");
            return (Criteria) this;
        }

        public Criteria andSesaltNotLike(String value) {
            addCriterion("sesalt not like", value, "sesalt");
            return (Criteria) this;
        }

        public Criteria andSesaltIn(List<String> values) {
            addCriterion("sesalt in", values, "sesalt");
            return (Criteria) this;
        }

        public Criteria andSesaltNotIn(List<String> values) {
            addCriterion("sesalt not in", values, "sesalt");
            return (Criteria) this;
        }

        public Criteria andSesaltBetween(String value1, String value2) {
            addCriterion("sesalt between", value1, value2, "sesalt");
            return (Criteria) this;
        }

        public Criteria andSesaltNotBetween(String value1, String value2) {
            addCriterion("sesalt not between", value1, value2, "sesalt");
            return (Criteria) this;
        }
    }

    /**
     */
    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}